package com.jyx.api.course;

import com.jyx.framework.domain.course.*;
import com.jyx.framework.domain.course.ext.CourseView;
import com.jyx.framework.domain.course.ext.TeachplanNode;
import com.jyx.framework.domain.course.request.CourseListRequest;
import com.jyx.framework.domain.course.response.CoursePublishResult;
import com.jyx.framework.model.response.QueryResponseResult;
import com.jyx.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@Api(value = "课程管理接口",tags = "课程管理接口，提供课程查询，课程管理计划查询等操作")
public interface CourseControllerApi {
    @ApiOperation("课程计划查询")
    TeachplanNode findTeachplanList(String courseId);
    @ApiOperation("课程计划添加")
    ResponseResult addTeachplan(Teachplan teachplan);

   // @PreAuthorize("hasAuthority('course_get_baseinfo')")
    @ApiOperation("查询课程基本信息")
    CourseBase queryCourseBaseById(String id);

    @ApiOperation("修改课程基本信息")
    ResponseResult editCourse(String id,CourseBase courseBase);

    @ApiOperation("查询我的课程列表")
    QueryResponseResult findCourseList(int page, int size, CourseListRequest courseListRequest,HttpServletRequest request);
    @ApiOperation("添加课程")
    ResponseResult addCourse(CourseBase courseBase,HttpServletRequest request);

    @ApiOperation("获取课程营销信息")
    CourseMarket getCourseMarketById(String courseId);
    @ApiOperation("更新课程营销信息")
    ResponseResult updateCourseMarket(String id, CourseMarket courseMarket);

    @ApiOperation(value = "添加文件信息到数据库")
    ResponseResult addCoursePic(String courseId,String pic);
    @ApiOperation(value = "删除文件")
    ResponseResult delCoursePic(String courseId);

    @ApiOperation(value = "展示图片信息")
    CoursePic findCoursePic(String courseId);

    @ApiOperation("课程视图查询")
    CourseView courseView(String id);
    @ApiOperation("课程预览")
    CoursePublishResult preview(String id);

    @ApiOperation("发布课程")
    CoursePublishResult publish(@PathVariable String id);

    @ApiOperation("保存媒资信息")
    ResponseResult savemedia(TeachplanMedia teachplanMedia);

    @ApiOperation("获取课程发布信息")
    CoursePub getCoursePubById(String courseId);


}
